<template>
  <div class="dashboard-container">
    <component :is="currentRole" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import dashboardNormal from './business_data'
import dashboardManage from './business_data/manageIndex'
const manageTypes = ['admin','group']

export default {
  name: 'Dashboard',
  components: { dashboardNormal, dashboardManage },
  computed:{
    ...mapGetters([
      'utype'
    ]),
    currentRole(){
      return manageTypes.indexOf(this.utype)>-1?'dashboardManage':'dashboardNormal'
    }
  },
  data() {
    return {
    }
  }
}
</script>
